﻿CREATE TABLE [dbo].[FC_Forecast] (
    [IdForecast] INT      IDENTITY (1, 1) NOT NULL,
    [IdUsuario]  INT      NULL,
    [IdPeriod]   INT      NULL,
    [IdCustomer] INT      NULL,
    [IdProduct]  INT      NULL,
    [Volume]     INT      NULL,
    [DateIng]    DATETIME NULL,
    [DateMod]    DATETIME NULL,
    CONSTRAINT [PK_FC_Foresast] PRIMARY KEY CLUSTERED ([IdForecast] ASC),
    CONSTRAINT [FK_FC_Forecast_FC_Period] FOREIGN KEY ([IdPeriod]) REFERENCES [dbo].[FC_Period] ([IdPeriod]),
    CONSTRAINT [FK_FC_Forecast_FC_Product] FOREIGN KEY ([IdProduct]) REFERENCES [dbo].[FC_Product] ([IdProduct]),
    CONSTRAINT [FK_FC_Foresast_FC_Cliente] FOREIGN KEY ([IdCustomer]) REFERENCES [dbo].[FC_Customer] ([IdCustomer]),
    CONSTRAINT [FK_FC_Foresast_FC_Usuario] FOREIGN KEY ([IdUsuario]) REFERENCES [dbo].[FC_User] ([IdUsuario])
);



